Skip to content

Fixes for BDDC#5152

Open
pbrubeck wants to merge 11 commits into
releasefrom
pbrubeck/fix/bddc
Open

Fixes for BDDC#5152
pbrubeck wants to merge 11 commits into
releasefrom
pbrubeck/fix/bddc

Conversation

@pbrubeck

@pbrubeck pbrubeck commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Description

@pbrubeck pbrubeck force-pushed the pbrubeck/fix/bddc branch from e11e7da to 2f8b06c Compare June 6, 2026 12:25
entity_dofs = V.finat_element.entity_dofs()
vdofs = entity_dofs[min(entity_dofs)]
if any(len(vdofs[v]) > 0 for v in vdofs):
bddcpc.setCoordinates(get_entity_coordinates(V))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefanozampini when does BDDC need the coordinates? Only for H1?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It usually requires coordinates to identify enough subdomain corners so that the local Neumann problem is non-singular. So I would say every finite element space that associates dofs to element vertices

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, that is what I thought, hence the vdofs logic. But what about non-conforming spaces like Crouzeix-Raviart and Mardal-Tai-Winther?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have never experimented with those elements. They are non-conforming, but they associate point evaluations right? So I would say each dof that is a point evaluation. Then I should probably check if the BDDC code can accepts NaNs for some of the coordinates and completely exclude the search from these dofs. This way, we can extract what we need only from point-evaluation dofs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR has point evaluations at faces, but MTW is more like BDM plus tangential moments on facets.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can always associate the dofs with entities and give you the coordinates of the entity

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is what you are doing in this PR? Leave it as it is then. There's no theory on this; the reason for doing this is practical. if your subdomain problem is just a seminorm (think Poisson), you need to exclude some dofs to get an invertible local Neumann problem. And this can be done with CG elements by just identifying subdomain corners dofs. The equivalent for Hcurl and HDiv problems is probably to identify the dofs on the faces/edges that represent the lowest-order moment, and pick at least one of them per subdomain edge/face (this is what I do using coordinates). But this is just speculation and I have never experimented much with that

Comment thread firedrake/preconditioners/bddc.py Outdated


@pytest.mark.parametrize("family,degree,cellwise", [("GN", 1, True), ("MTW", 1, True)])
def test_bddc_elasticity_aij_simplex(rg, family, degree, cellwise):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefanozampini this test is currently failing (PCG diveges due to indefinite PC). You can run it with

pytest -vs tests/firedrake/regression/test_bddc.py::test_bddc_elasticity_aij_simplex -m parallel[1]

@pbrubeck pbrubeck force-pushed the pbrubeck/fix/bddc branch from 804646e to 1bc6e36 Compare June 8, 2026 10:24
"bddc_pc_bddc_neumann": chol,
"bddc_pc_bddc_dirichlet": chol,
"bddc_pc_bddc_coarse": chol,
"bddc_pc_bddc_corner_selection": True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an option, not always True


ew = solver.snes.ksp.computeEigenvalues()
assert min(ew) >= 1.0
ew = solver.snes.ksp.computeEigenvalues().real

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use numpy.isclose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants